Ext.define('HRMS.controller.main.DashboardController', {
	extend : 'Ext.app.Controller',

	views : [ 
	    'main.Navigation',
	    'main.TopBar' 
	],

	init : function() {
		this.control({
			'navigation' : {
				click : this.onMenuClicked
			},
			'topbar #logout' : {
				click : this.onSubmitLogout
			},
		});
	},

	onMenuClicked : function() {
		//console.log('Double clicked on ' + record.get('name'));
	},

	onSubmitLogout : function(button, e) {
		var form = button.up('form');

		form.submit({
			url : CONTEXT_PATH + '/logout',
		});
	}
});